package com.ruoyi.system.feign;

import com.ruoyi.system.feign.model.FeignKnowledgeClassifyModel;
import com.ruoyi.system.feign.model.FeignKnowledgeSessionModel;
import com.ruoyi.system.feign.model.FeignKnowledgeSessionModel;
import com.ruoyi.system.feign.result.FeignDataResult;
import com.ruoyi.system.feign.result.FeignObjectResult;
import com.ruoyi.system.feign.result.PageHelper;
import feign.Headers;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(
        name = "knowledgeSessionServiceClient",
        url = "${service.openai.url}"
)
public interface KnowledgeSessionServiceClient {


    @PostMapping("/admin/knowledgeSession/find")
    @Headers({"Content-Type: application/json"})
    FeignDataResult<FeignKnowledgeSessionModel> find(@RequestBody PageHelper<FeignKnowledgeSessionModel> pageHelper);

    @PostMapping("/admin/knowledgeSession/findAll")
    @Headers({"Content-Type: application/json"})
    FeignObjectResult<List<FeignKnowledgeSessionModel>> findAll(@RequestBody FeignKnowledgeSessionModel search);

    @PostMapping("/admin/knowledgeSession/save")
    @Headers({"Content-Type: application/json"})
    FeignObjectResult<FeignKnowledgeSessionModel> save(@RequestBody FeignKnowledgeSessionModel model);

    @GetMapping("/admin/knowledgeSession/delete/{id}")
    @Headers({"Content-Type: application/json"})
    FeignObjectResult<Boolean> delete(@PathVariable(value = "id") String id);

    @PostMapping("/admin/knowledgeSession/update")
    @Headers({"Content-Type: application/json"})
    FeignObjectResult<FeignKnowledgeSessionModel> update(@RequestBody FeignKnowledgeSessionModel model);

    @GetMapping("/admin/knowledgeSession/detail/{id}")
    @Headers({"Content-Type: application/json"})
    FeignObjectResult<FeignKnowledgeSessionModel> detail(@PathVariable(value = "id") String id);

    @GetMapping("/admin/knowledgeSession/exists")
    @Headers({"Content-Type: application/json"})
    FeignObjectResult<Boolean> exists(@RequestBody FeignKnowledgeSessionModel search);
}
